<template>
  <view class="container">
    <scroll-view scroll-y="true" class="scroll-view">
      <view class="image-list">
				<view v-for="(image, index) in images" :key="index">
					<uni-card>
						<image
							:src="image.url"
							class="image-item"
							mode="aspectFill"
						></image>
					</uni-card>
				</view>
      </view>
    </scroll-view>
  </view>
</template>
 
<script>
  import { getScheduleMatch } from "@/api/puyu/schedule";
	export default {
		data() {
			return {
				images: [],
			};
		},
		onLoad(option) {
			const scheduleId = option.scheduleId;
			getScheduleMatch(scheduleId).then(response => {
				if (response.data.image) {
					let imgs = response.data.image.split(",");
					for (let i = 0; i < imgs.length; i++) {
						let img = {url: imgs[i]};
						this.images.push(img);
					}
				}
			});
		},
	};
</script>
 
<style>
	.container {
		height: 100%;
		display: flex;
		flex-direction: column;
	}
	 
	.scroll-view {
		flex: 1;
		overflow: hidden;
	}
	 
	.image-list {
		display: flex;
		flex-direction: column;
	}
	 
	.image-item {
		width: 100%;
		height: 300px; /* 根据需要调整图片高度 */
		margin-bottom: 10px; /* 图片之间的间距 */
	}
	image {
		display: block;
		margin: 0 auto;
	}
</style>